<html>
<head><title>Google App Engine for Python</title></head>
    <body><center>
    <table bgcolor="#eeeeee"><tr><td width="1024">
    	<table bgcolor="#ffffff" width="100%" height="125">
    		<tr>
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    		</td></tr>
    		<tr>
    			<th colspan="2" bgcolor="#b6b6b6">
    			<th colspan="2" bgcolor="#b6b6b6">
    			<th colspan="2" bgcolor="#b6b6b6">
    			<th colspan="2" bgcolor="#b6b6b6">
    			<th colspan="2" bgcolor="#b6b6b6">
    			<th colspan="2" bgcolor="#b6b6b6">
    		</td></tr>
    			<tr>
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    		</td></tr>
    		<tr>
    			<th colspan="1" bgcolor="#b6b6b6">
    			<th colspan="2" bgcolor="#b6b6b6">
    			<th colspan="2" bgcolor="#b6b6b6">
    			<th colspan="2" bgcolor="#b6b6b6">
    			<th colspan="2" bgcolor="#b6b6b6">
    			<th colspan="2" bgcolor="#b6b6b6">
    			<th colspan=1" bgcolor="#b6b6b6">
    		</td></tr>
    		<tr>
    			<th colspan="3" bgcolor="#b6b6b6">
    			<th colspan="3" bgcolor="#b6b6b6">
    			<th colspan="3" bgcolor="#b6b6b6">
    			<th colspan="3" bgcolor="#b6b6b6">
    		</td></tr>
    		<tr>
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    			<td bgcolor="#b6b6b6">
    		</td></tr>
    	</table>
    	<form action="/api_key/list" method="post">
        <div align="right">Search: <input type="text" name="kq" value="" /> <input type="submit" value="go" /></div>
        </form>
        {% if apise %}
        <table border="0" cellspacing="1" cellpadding="5" bgcolor="#CCCCCC" width="1024">
            <tr bgcolor="#407BA8">
                <td style="color: #ffffff; font-weight: bold;" align="center" >Name</td>
                <td style="color: #ffffff; font-weight: bold;" align="center">Email</td>
                <td style="color: #ffffff; font-weight: bold;" align="center">ApiKey</td>
                <td style="color: #ffffff; font-weight: bold;" align="center">SecretKey</td>
                <td style="color: #ffffff; font-weight: bold;" align="center">Enabled</td>
                <td style="color: #ffffff; font-weight: bold;" align="center">Edit</td>
                <td style="color: #ffffff; font-weight: bold;" align="center">Delete</td>
            </tr>
            <tr bgcolor="#407BA8">
                <td bgcolor="#ffffff" >{{ apise.name }}</td>
                <td bgcolor="#ffffff">{{ apise.email }}</td>
                <td bgcolor="#ffffff">{{ apise.api_key }}</td>
                <td bgcolor="#ffffff">{{ apise.secret_key }}</td>
                <td bgcolor="#ffffff" align="center">
                    <input type="checkbox" name="{{ apise.api_key }}"
                    {% if apise.enabled %} checked{% endif %} disabled>
                </td>
                <td bgcolor="#ffffff"><a href="/api_key/edit?key={{ apise.key }}">Edit</a></td>
                <td bgcolor="#ffffff"><a href="/api_key/delete?key={{ apise.key }}">Delete</a></td>
            </tr>
        </table>
        <form action="/api_key/list" method="get">
        <div align="right"><input type="submit" value="Go back" /></div>
        </form>
        {% else %}
    	<span style="font-weight: bold; font-size: 20px">List Account:</span><br>
        <!-- <table border="1"> -->
        <table border="0" cellspacing="1" cellpadding="5" bgcolor="#CCCCCC">
            <tr bgcolor="#407BA8">
                <td style="color: #ffffff; font-weight: bold;" align="center">Name</td>
                <td style="color: #ffffff; font-weight: bold;" align="center">Email</td>
                <td style="color: #ffffff; font-weight: bold;" align="center">ApiKey</td>
                <td style="color: #ffffff; font-weight: bold;" align="center">SecretKey</td>
                <td style="color: #ffffff; font-weight: bold;" align="center">Enabled</td>
                <td style="color: #ffffff; font-weight: bold;" align="center">Edit</td>
                <td style="color: #ffffff; font-weight: bold;" align="center">Delete</td>
            </tr>
            {% for api in apis %}
    		{% if api %}
            <tr bgcolor="#407BA8">
                <td bgcolor="#ffffff">{{ api.name }}</td>
                <td bgcolor="#ffffff">{{ api.email }}</td>
                <td bgcolor="#ffffff">{{ api.api_key }}</td>
                <td bgcolor="#ffffff">{{ api.secret_key }}</td>
                <td bgcolor="#ffffff" align="center">
                    <input type="checkbox" name="{{ api.api_key }}"
                    {% if api.enabled %} checked{% endif %} disabled>
                </td>
                <td bgcolor="#ffffff"><a href="/api_key/edit?key={{ api.key }}">Edit</a></td>
                <td bgcolor="#ffffff"><a href="/api_key/delete_l?key={{ api.key }}">Delete</a></td>
            </tr>
            {% endif %}
            {% endfor %}
        {% endif %}
        </table>
    </td></tr></table></center>	
    </body>
</html>

